package com.ld.security.server.admin.modules.lan.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.anno.IdKey;
import com.ld.security.common.core.base.column.ListJson;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKey;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("lan_view")
@ApiModel("文档")
@Data
public class LanViewEntity extends SuperEntity implements LabelMap
{

    @LabelKeys(value = LanLangEntity.class,
            labels = {
                    @LabelKey(sourceKey = "label",targetKey = ""),
                    @LabelKey(sourceKey = "code",targetKey = "langCode")
            }
    )
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("语言编号")
    private String langId;

    @LabelKeys(value = LanViewTelEntity.class,
            labels = {
                    @LabelKey(sourceKey = "label",targetKey = ""),
            @LabelKey(sourceKey = "code",targetKey = "code")
            }
    )
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("文档模板编号")
    private String viewTelId;


    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("编码")
    private String code;

    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("语言编码")
    private String langCode;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String label;


    @SqlKey(SqlCondition.like)
    @ApiModelProperty("介绍")
    private String content;

    @ApiModelProperty("元素配置")
    private ListJson eleConfig;


    private MapJson labelMap;



    @Override
    public String getId() {
        return super.getId();
    }
}
